package com.five.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class QueryPage<T> {
    private Integer pageNum=1;
    private Integer pageSize=10;
    private Integer startIndex;
    private T t;

    public Integer getStartIndex() {
        if (pageNum == null || pageSize == null) {
            return null;
        }
        this.startIndex = (pageNum - 1) * pageSize;
        return startIndex;
    }
}
